<?php

namespace app\admin\Controller;


use think\Controller;
use think\Session;
use think\Db;

class Auth extends Controller
{

    public function login()
    {
        if(is_login(Session::get('admin'))){
            $this->success('已登录，无需重复登录', '/admin/index/index');
        }
        return $this->fetch();
    }

    public function logout()
    {
        Session::clear();
        return redirect(('/Admin/Auth/login'));
    }

}
